package com.javasm.gg.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.javasm.gg.Goods;
import com.javasm.gg.GoodsService;
import com.javasm.gg.dao.GoodsDao;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsDao,Goods> implements GoodsService {

    @Override
    public List<Goods> listGoodsAndGoodsType(Goods goods) {
        return this.baseMapper.listGoodsAndGoodsType(goods);
    }

    @Override
    public List<Goods> listGoods2AndGoodsType(Goods goods) {
        return this.baseMapper.listGoods2AndGoodsType(goods);
    }

    @Override
    public boolean updateGoodsStock(Integer goodsId, Integer count) {
        int r=this.baseMapper.updateGoodsStock(goodsId,count);
        return r==1;

    }
}
